package com.zhaoyizhe.demo.mapper;

import com.zhaoyizhe.demo.model.MessageInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MessageInfoXMLMapper {

    @Insert("insert into message_info (`from`,`to`,`message`) values (#{from},#{to},#{message})")
    Integer insertInfo(MessageInfo messageInfo);

    @Select("select * from message_info where delete_flag = 0")
    List<MessageInfo> queryInfo();
}
